<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 transitional//EN">
<html>
<head>
<title>Filter Condition Element (Eclipse BIRT ROM Documentation)</title>
<link rel="stylesheet" href="../style/style.css" type="text/css"/>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<p class="title">Eclipse BIRT Report Object Model (ROM)</p>
<p class="subtitle">FilterCondition Structure</p>
<h1>Structure Overview</h1>
<div class="section-text">
Defines a fileter criteria.</div>
<h3>Details</h3>

<table class="detail-table">
<tr><td>Display Name:</td>
<td>Filter Condition</td></tr>
<tr><td>Since:</td>
<td>1.0</td></tr>
</table>

<h3>Property Summary</h3>

<dl class="section-text">
<dt><a href="#Property-dynamicFilterParameter">dynamicFilterParameter</a></dt>
<dd></dd>
<dt><a href="#Property-expr">expr</a></dt>
<dd>The name of a data row column or an aggregate 
expression.</dd>
<dt><a href="#Property-extensionExprId">extensionExprId</a></dt>
<dd></dd>
<dt><a href="#Property-extensionName">extensionName</a></dt>
<dd></dd>
<dt><a href="#Property-filterTarget">filterTarget</a></dt>
<dd></dd>
<dt><a href="#Property-isOptional">isOptional</a></dt>
<dd></dd>
<dt><a href="#Property-operator">operator</a></dt>
<dd>The operator to apply to the expression.</dd>
<dt><a href="#Property-pushDown">pushDown</a></dt>
<dd></dd>
<dt><a href="#Property-value1">value1</a></dt>
<dd>The first (or only) operand.</dd>
<dt><a href="#Property-value2">value2</a></dt>
<dd>The second operator for between &amp; not between operators.</dd>
</dl>

<h3>Description</h3>

<div class="section-text">
<p>The filter criteria defines a filter to apply to a List, 
Table, Group or other element. Expressions are of the form &quot;expression op value&quot; 
or &quot;expression op value 1, value 2&quot;. A special case is &quot;expression is true&quot; in 
which the expression itself is a Boolean expression.</p>

<p>The simplest expression is comparison with a column in 
the data row:</p>

<pre class="code-block">row.State = &quot;CA&quot;</pre>

<p>A slightly more complex comparison is to use a report 
parameter:</p>

<pre class="code-block">row.State = params.StateParam</pre>

<p>Some conditions may require conditional logic:</p>

<pre class="code-block">( row.Balance &lt; 0 || row.Status = &quot;Suspended&quot; ) <i>is true</i></pre>

<p>Note that the &quot;is true&quot; is present just to say that the 
entire expression should, itself, be treated as a complete condition.</p>

<p>Ranking expressions let the report choose only the most 
interesting rows:</p>

<pre class="code-block">row.Balance Top 10</pre>

<p>Which means to display the ten customers with the highest 
balances.</p>

<p>When used with groups, a filter can refer to total 
computed over the group:</p>

<pre class="code-block">Total.sum( row.InvoiceAmt ) &gt; 1000</pre>

<p>The filter can also refer to totals computed over the 
entire data set, or a higher level group. To display only customers whose sales 
account for at least 5% of total sales:</p>

<pre class="code-block">Total.sum( row.InvoiceAmt ) &gt;= Total.sum_overall( row.InvoiceAmt ) * 0.05</pre></div>
<h1>Property Detail</h1>

<h2><a name="Property-dynamicFilterParameter">dynamicFilterParameter Property</a></h2>

<p class="section-text"></p>
<h3>Details</h3>

<table class="detail-table">
<tr><td>Type:</td>
<td><a href="../types.html#string">string</a></td></tr>
<tr><td>Since:</td>
<td>2.5</td></tr>
<tr><td>Required:</td>
<td>No</td></tr>
<tr><td>Display Name:</td>
<td>Dynamic Filter Parameter</td></tr>
<tr><td>JavaScript Type:</td>
<td></td></tr>
<tr><td>Default Value:</td>
<td>None</td></tr>
<tr><td>Runtime Settable:</td>
<td>No</td></tr>
</table>


<hr>
<h2><a name="Property-expr">expr Property</a></h2>

<p class="section-text">The name of a data row column or an aggregate 
expression.</p>
<h3>Details</h3>

<table class="detail-table">
<tr><td>Type:</td>
<td><a href="../types.html#expression">expression</a></td></tr>
<tr><td>Context:</td>
<td></td></tr>
<tr><td>Expression Type:</td>
<td>any</td></tr>
<tr><td>Since:</td>
<td>1.0</td></tr>
<tr><td>Required:</td>
<td>Yes</td></tr>
<tr><td>Display Name:</td>
<td>Expression</td></tr>
<tr><td>JavaScript Type:</td>
<td></td></tr>
<tr><td>Default Value:</td>
<td>None</td></tr>
<tr><td>Runtime Settable:</td>
<td>No</td></tr>
</table>

<h3>Description</h3>

<div class="section-text">
<p>The filter expression is the name of a data row column or 
an aggregate expression. A filter only makes sense when computed using a data 
row column. BIRT accepts a value such as 1 or &quot;hello, world&quot;, but then the same 
filter criteria will be applied to every row. Such behavior may be useful when 
testing, but seldom in a production report.</p></div>

<hr>
<h2><a name="Property-extensionExprId">extensionExprId Property</a></h2>

<p class="section-text"></p>
<h3>Details</h3>

<table class="detail-table">
<tr><td>Type:</td>
<td><a href="../types.html#string">string</a></td></tr>
<tr><td>Since:</td>
<td>2.5</td></tr>
<tr><td>Required:</td>
<td>No</td></tr>
<tr><td>Display Name:</td>
<td>Extension Expression Id</td></tr>
<tr><td>JavaScript Type:</td>
<td></td></tr>
<tr><td>Default Value:</td>
<td>None</td></tr>
<tr><td>Runtime Settable:</td>
<td>No</td></tr>
</table>


<hr>
<h2><a name="Property-extensionName">extensionName Property</a></h2>

<p class="section-text"></p>
<h3>Details</h3>

<table class="detail-table">
<tr><td>Type:</td>
<td><a href="../types.html#string">string</a></td></tr>
<tr><td>Since:</td>
<td>2.5</td></tr>
<tr><td>Required:</td>
<td>No</td></tr>
<tr><td>Display Name:</td>
<td>Extension Name</td></tr>
<tr><td>JavaScript Type:</td>
<td></td></tr>
<tr><td>Default Value:</td>
<td>None</td></tr>
<tr><td>Runtime Settable:</td>
<td>No</td></tr>
</table>


<hr>
<h2><a name="Property-filterTarget">filterTarget Property</a></h2>

<p class="section-text"></p>
<h3>Details</h3>

<table class="detail-table">
<tr><td>Type:</td>
<td><a href="../types.html#choice">choice</a> (filterTarget)</td></tr>
<tr><td>Since:</td>
<td>2.1</td></tr>
<tr><td>Required:</td>
<td>No</td></tr>
<tr><td>Display Name:</td>
<td>Filter Target</td></tr>
<tr><td>JavaScript Type:</td>
<td></td></tr>
<tr><td>Default Value:</td>
<td>DataSet</td></tr>
<tr><td>Runtime Settable:</td>
<td>No</td></tr>
</table>

<h3>Choices</h3>

<table class="section-table">
<thead><tr><td>Name</td><td>Display Name</td>
<td>Value</td><td>Description</td></tr></thead>
<tbody>
<tr><td>DataSet</td>
<td>Data Set</td>
<td>DataSet</td>
<td></td></tr>
<tr><td>ResultSet</td>
<td>Result Set</td>
<td>ResultSet</td>
<td></td></tr>
<tr><td>OdaDataSet</td>
<td>ODA Data Set</td>
<td>OdaDataSet</td>
<td></td></tr>
</tbody></table><br>

<hr>
<h2><a name="Property-isOptional">isOptional Property</a></h2>

<p class="section-text"></p>
<h3>Details</h3>

<table class="detail-table">
<tr><td>Type:</td>
<td><a href="../types.html#boolean">boolean</a></td></tr>
<tr><td>Since:</td>
<td>2.2</td></tr>
<tr><td>Required:</td>
<td>No</td></tr>
<tr><td>Display Name:</td>
<td>Is Optional</td></tr>
<tr><td>JavaScript Type:</td>
<td></td></tr>
<tr><td>Default Value:</td>
<td>false</td></tr>
<tr><td>Runtime Settable:</td>
<td>No</td></tr>
</table>


<hr>
<h2><a name="Property-operator">operator Property</a></h2>

<p class="section-text">The operator to apply to the expression.</p>
<h3>Details</h3>

<table class="detail-table">
<tr><td>Type:</td>
<td><a href="../types.html#choice">choice</a> (filterOperator)</td></tr>
<tr><td>Since:</td>
<td>1.0</td></tr>
<tr><td>Required:</td>
<td>No</td></tr>
<tr><td>Display Name:</td>
<td>Operator</td></tr>
<tr><td>JavaScript Type:</td>
<td></td></tr>
<tr><td>Default Value:</td>
<td>eq</td></tr>
<tr><td>Runtime Settable:</td>
<td>No</td></tr>
</table>

<h3>Choices</h3>

<table class="section-table">
<thead><tr><td>Name</td><td>Display Name</td>
<td>Value</td><td>Description</td></tr></thead>
<tbody>
<tr><td>eq</td>
<td>Equal to</td>
<td>eq</td>
<td>Relational 
    operator.</td></tr>
<tr><td>ne</td>
<td>Not Equal to</td>
<td>ne</td>
<td>Relational 
    operator.</td></tr>
<tr><td>lt</td>
<td>Less than</td>
<td>lt</td>
<td>Relational 
    operator.</td></tr>
<tr><td>le</td>
<td>Less than or Equal</td>
<td>le</td>
<td>Relational 
    operator.</td></tr>
<tr><td>ge</td>
<td>Greater than or Equal</td>
<td>ge</td>
<td>Relational 
    operator.</td></tr>
<tr><td>gt</td>
<td>Greater than</td>
<td>gt</td>
<td>Relational 
    operator.</td></tr>
<tr><td>between</td>
<td>Between</td>
<td>between</td>
<td>Checks if a value is between two values.</td></tr>
<tr><td>not-between</td>
<td>Not Between</td>
<td>not-between</td>
<td>Checks if a value is not between two values.</td></tr>
<tr><td>is-null</td>
<td>Is Null</td>
<td>is-null</td>
<td>Checks if the value is null.</td></tr>
<tr><td>is-not-null</td>
<td>Is Not Null</td>
<td>is-not-null</td>
<td>Checks if the value is not null.</td></tr>
<tr><td>is-true</td>
<td>Is True</td>
<td>is-true</td>
<td>Checks a Boolean condition. Use these if the expression condition 
itself already expresses the full filter condition.</td></tr>
<tr><td>is-false</td>
<td>Is False</td>
<td>is-false</td>
<td>Checks if a Boolean condition is false.</td></tr>
<tr><td>like</td>
<td>Like</td>
<td>like</td>
<td>Check the value of a 
    column against a JavaScript regular expression.</td></tr>
<tr><td>top-n</td>
<td>Top n</td>
<td>top-n</td>
<td>Accept the value only if it is within the top <i>n </i>values.</td></tr>
<tr><td>bottom-n</td>
<td>Bottom n</td>
<td>bottom-n</td>
<td>Accept the value only 
    if it is within the  bottom <i>n </i>values.</td></tr>
<tr><td>top-percent</td>
<td>Top Percent</td>
<td>top-percent</td>
<td>Accept the value only if it is within the top percentage of values.</td></tr>
<tr><td>bottom-percent</td>
<td>Bottom Percent</td>
<td>bottom-percent</td>
<td>Accept the value only 
    if it is within the bottom percentage<i></i>of values.</td></tr>
<tr><td>match</td>
<td>Match</td>
<td>match</td>
<td></td></tr>
<tr><td>not-like</td>
<td>Not Like</td>
<td>not-like</td>
<td></td></tr>
<tr><td>not-match</td>
<td>Not Match</td>
<td>not-match</td>
<td></td></tr>
<tr><td>in</td>
<td>In</td>
<td>in</td>
<td></td></tr>
<tr><td>not-in</td>
<td>Not In</td>
<td>not-in</td>
<td></td></tr>
</tbody></table><br>
<h3>Description</h3>

<div class="section-text">
<p>A filter criteria is of the form:</p>

<pre class="code-block">expr op value1 (value2)</pre>

<p>The operator says how to test the expression. It can be a 
simple relational operator:</p>

<pre class="code-block">expr = 10</pre>

<p>Or one of the other operations shown above.</p>

<p>The ranking operators (Top N, Bottom N, Top Percent and 
Bottom Percent) can include ties. For example, suppose we want the top three 
customers by sales. Suppose we have the following customers and sales:</p>

<ul>
<li>A, 100</li>
<li>B, 200</li>
<li>C, 300</li>
<li>D, 100</li>
<li>E, 50</li>
<li>F, 0</li>
</ul>

<p>A top-3 ranking would include customers C, B, A and D 
because A and D both have the same sales amount.</p></div>

<hr>
<h2><a name="Property-pushDown">pushDown Property</a></h2>

<p class="section-text"></p>
<h3>Details</h3>

<table class="detail-table">
<tr><td>Type:</td>
<td><a href="../types.html#boolean">boolean</a></td></tr>
<tr><td>Since:</td>
<td>2.5</td></tr>
<tr><td>Required:</td>
<td>No</td></tr>
<tr><td>Display Name:</td>
<td>Push Down</td></tr>
<tr><td>JavaScript Type:</td>
<td></td></tr>
<tr><td>Default Value:</td>
<td>false</td></tr>
<tr><td>Runtime Settable:</td>
<td>No</td></tr>
</table>


<hr>
<h2><a name="Property-value1">value1 Property</a></h2>

<p class="section-text">The first (or only) operand.</p>
<h3>Details</h3>

<table class="detail-table">
<tr><td>Type:</td>
<td><a href="../types.html#list">list</a></td></tr>
<tr><td>Since:</td>
<td>1.0</td></tr>
<tr><td>Required:</td>
<td>No</td></tr>
<tr><td>Display Name:</td>
<td>Value 1</td></tr>
<tr><td>JavaScript Type:</td>
<td></td></tr>
<tr><td>Default Value:</td>
<td>None</td></tr>
<tr><td>Runtime Settable:</td>
<td>No</td></tr>
</table>

<h3>Description</h3>

<div class="section-text">
<p>The value for simple conditions with the operators: &lt;, 
&lt;=, =, &lt;&gt;, &gt;=, &gt;, between, not between, like. Gives the &quot;N&quot; for the top N, 
Bottom N conditions. Gives the &quot;percent&quot; for the Top Percent and Bottom Percent 
conditions.</p>

<p>The <code>value1</code> property for a 
ranking operator must be constant with respect to the data set. For example, it 
can reference a report parameter, but not (normally) a column. The result is 
undefined when used with a value that varies within the data set.</p>

<table class="section-table">
    <thead><tr><td>Operator</td><td>Value 1</td></tr></thead>
  <tr>
    <td>&lt;, &lt;=, =, &lt;&gt;, &gt;=, &gt;</td>
    <td>X</td>
  </tr>
  <tr>
    <td>is null,<br>
    is not null</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>between, not between</td>
    <td>X<br>(lower bound)</td>
  </tr>
  <tr>
    <td>is true,<br>
    is false</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>like</td>
    <td>X<br>
    (the regular expression)</td>
  </tr>
  <tr>
    <td>any</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>top N,<br>
    bottom N</td>
    <td>X<br>
    (the n value)</td>
  </tr>
  <tr>
    <td>top percent, bottom percent</td>
    <td>X<br>(the % value)</td>
  </tr>
</table></div>

<hr>
<h2><a name="Property-value2">value2 Property</a></h2>

<p class="section-text">The second operator for between &amp; not between operators.</p>
<h3>Details</h3>

<table class="detail-table">
<tr><td>Type:</td>
<td><a href="../types.html#expression">expression</a></td></tr>
<tr><td>Context:</td>
<td></td></tr>
<tr><td>Expression Type:</td>
<td>any</td></tr>
<tr><td>Since:</td>
<td>1.0</td></tr>
<tr><td>Required:</td>
<td>No</td></tr>
<tr><td>Display Name:</td>
<td>Value 2</td></tr>
<tr><td>JavaScript Type:</td>
<td></td></tr>
<tr><td>Default Value:</td>
<td>None</td></tr>
<tr><td>Runtime Settable:</td>
<td>No</td></tr>
</table>

<h3>Description</h3>

<div class="section-text">
<p>The value for conditions with the operators between and 
not between. Gives the upper value of the range.</p>

<table class="section-table">
    <thead><tr>
      <td>Operator</td><td>Value 2</td>
    </tr></thead>
  <tr>
    <td>&lt;, &lt;=, =, &lt;&gt;, &gt;=, &gt;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>is null,<br>
    is not null</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>between, not between</td>
    <td>X<br>
    (upper bound)</td>
  </tr>
  <tr>
    <td>is true,<br>
    is false</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>like</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>any</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>top N,<br>
    bottom N</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>top percent, bottom percent</td>
    <td>&nbsp;</td>
  </tr>
</table></div>
</body>
</html>
